<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>圆的面积</title>
</head>
<body>


<input type="text" id="a" value="" placeholder="半径">
<input type="text" id="b" value="" placeholder="周长">
<input type="text" id="c" value="" placeholder="面积">

<script type="text/javascript">





    var t = prompt("请输入圆的半径");
    var p = Math.PI;
    a.value=t;
    //周长
    var zc = t * 2 * p;
    b.value=zc;
    //面积
    var mj = t * t * p;
    c.value = mj;



    document.querySelector("#a").value = t;
    document.querySelector("#b").value = zc;
    document.querySelector("#c").value = mj;





</script>
</body>
</html>